package com.ruoyi.message.controller.app;

import com.ruoyi.common.core.constant.Constants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.message.utils.AliSMSService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 短信模板Controller
 * 
 * @author
 * @date 2022-3-17
 */
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping(Constants.APP_URL + "/sms")
public class AppMessageSmsController extends BaseController {

    private final AliSMSService aliSMSService;

    // 获取验证码
    @GetMapping("/sendVerifyCode")
    public R sendVerifyCode(@RequestParam(value = "phone") String phone) {
        return aliSMSService.sendVerifyCode(phone);
    }

}
